#pragma once

#include <QWidget>
#include "ui_ktloginaccountwgt.h"
#include "ktloginstruct.h"

QT_BEGIN_NAMESPACE
namespace Ui { class KtLoginAccountWgtClass; };
QT_END_NAMESPACE

class KtLoginAccountWgt : public QWidget
{
	Q_OBJECT

public:
	KtLoginAccountWgt(QWidget *parent = nullptr);
	~KtLoginAccountWgt();
	void setLoginAccountInfo(KtLoginAccountInfo info);
	KtLoginAccountInfo getLoginAccountInfo();
	void setLoginTitleText(const QString& text);
	void setRemembCBoxVisible(bool bShow);
	bool remembCBoxVisible();
	void setAutoLoginCBoxVisible(bool bShow);
	bool autoLoginCBoxVisible();

Q_SIGNALS:
	void settingBtnClickedSgl();
	void loginBtnClickedSgl();

private:
	void initConnect();
	void initStyle();

protected:
	virtual bool eventFilter(QObject* watched, QEvent* event) Q_DECL_OVERRIDE;

private:
	Ui::KtLoginAccountWgtClass *ui;
	KtLoginAccountInfo m_info;
};
